﻿<UserControl x:Class="LED.Definition.LEDMaster"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:db="clr-namespace:LED.DataBase;assembly=LED.DataBase"
             DataContextChanged="UserControl_DataContextChanged"
          Height="800" Width="1000">
    <UserControl.Resources>
        <db:LEDDataSet  x:Key="lEDDataSet" />
        <CollectionViewSource  x:Key="vwLEDLIST" Source="{Binding Path=LEDLIST}"/>
        <CollectionViewSource  x:Key="vwMASTER" Source="{Binding Path=MASTER}"/>
        <CollectionViewSource  x:Key="vwLEDLOCATION" Source="{Binding Path=LEDLOCATION}"/>
    </UserControl.Resources>
    <Grid Grid.Row="0" Grid.Column="1">
        <Grid.RowDefinitions>
            <RowDefinition Height="50"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <WrapPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
            <Button Content="保存" Height="23" Name="cmdSaveMaster" Click="cmdSaveMaster_Click" Width="75" />
        </WrapPanel>
        <WrapPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
            <WrapPanel>
                <Grid     HorizontalAlignment="Left" Margin="0,0,0,0" Name="grid4" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="系统:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMSYSTEMTextBox" 
                         Text="{Binding Path=LMSYSTEM, Source={StaticResource ResourceKey=vwMASTER}, 
                    Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                </Grid>
                <Grid  HorizontalAlignment="Left" Name="grid10" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="屏ID:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMIDTextBox" 
                         Text="{Binding Path=LMID, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, 
                        ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                </Grid>
                <Grid  HorizontalAlignment="Left" Name="grid1" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="前缀:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMLEDPRETextBox"
                         Text="{Binding Path=LMLEDPRE, Source={StaticResource ResourceKey=vwMASTER},  
                    Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                </Grid>
                <Grid HorizontalAlignment="Left" Name="grid2" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="编号:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMLEDNUMBERTextBox" 
                         Text="{Binding Path=LMLEDNUMBER, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, 
                    ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="60" />
                </Grid>
                <Grid  HorizontalAlignment="Left" Name="grid3" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="位置:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMLOCATIONTextBox" 
                         Text="{Binding Path=LMLOCATION, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="60" />
                </Grid>
            </WrapPanel>
            <WrapPanel>
                <Grid  HorizontalAlignment="Left" Name="grid14" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="连接方式:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMCONNECTMETHODTextBox" 
                         Text="{Binding Path=LMCONNECTMETHOD, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="60" />
                </Grid>
                <Grid  HorizontalAlignment="Left" Name="grid5" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="IP地址:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMTCPIP4ADDRESSTextBox" 
                             Text="{Binding Path=LMTCPIP4ADDRESS, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="120" />
                </Grid>
                <Grid  HorizontalAlignment="Left" Name="grid6" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="端口:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMTCPIP4PORTTextBox" 
                             Text="{Binding Path=LMTCPIP4PORT, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, 
                        ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                </Grid>
                <Grid HorizontalAlignment="Left" Name="grid8" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="本地端口:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMREMOTEPORTTextBox" 
                             Text="{Binding Path=LMLOCALPORT, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, 
                        ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="40" />
                </Grid>
            </WrapPanel>
            <WrapPanel>
                <Grid   HorizontalAlignment="Left" Name="grid11" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="屏高mm:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMPHYSICALHEIGHTTextBox" 
                         Text="{Binding Path=LMPHYSICALHEIGHT, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, 
                        ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="50" />
                </Grid>
                <Grid  Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,0" Name="grid7" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="屏宽mm:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" 
                                 Name="lMPHYSICALWIDTHTextBox" Text="{Binding Path=LMPHYSICALWIDTH,
                            Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" 
                                 VerticalAlignment="Center" Width="50" />
                </Grid>
                <Grid  HorizontalAlignment="Left" Name="grid12" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="水平点数:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMLEDXPOINTTextBox"
                         Text="{Binding Path=LMLEDXPOINT, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="60" />
                </Grid>
                <Grid  HorizontalAlignment="Left" Name="grid13" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="垂直点数:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="lMLEDYPOINTTextBox" 
                         Text="{Binding Path=LMLEDYPOINT, Source={StaticResource ResourceKey=vwMASTER}, Mode=TwoWay, 
                        ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="60" />
                </Grid>
            </WrapPanel>
        </WrapPanel>
        <StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"></StackPanel>
    </Grid>
</UserControl>